
def intersectionOfTwoArrays(l1, l2):
    l1_set = set(l1)
    l2_set = set(l2)
    li = []
    for i in l1_set:
        if i in l2_set:
            li.append(i)
    return li
def from_leecode(nums1, nums2):
    return set(nums1).intersection(set(nums2))



if __name__ == "__main__":
    l1 = [1,3,4,5,6,7,8]
    l2 = [2,4,5,6,7,8]
    print(intersectionOfTwoArrays(l1, l2))
    print(type(from_leecode(l1,l2)))